﻿using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using ChurchWebsite.Controllers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ChurchWebsite.Areas.Website.Controllers
{
    public class BannerController : BaseController
    {
        //
        // GET: /Website/Banner/

        public ActionResult Index()
        {
            return View();
        }
        public JsonResult GetBanners()
        {
            return Json(new BLL_Website().GetBanners(), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetBanner(Guid dataId)
        {
            return Json(new BLL_Website().GetBanner(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult AddBanner(EntityBanner Banner)
        {
            return Json(new BLL_Website().AddBanner(Banner), JsonRequestBehavior.AllowGet);
        }
        public JsonResult UpdateBanner(EntityBanner Banner)
        {
            return Json(new BLL_Website().UpdateBanner(Banner), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteBanner(Guid dataId)
        {
            return Json(new BLL_Website().DeleteBanner(dataId), JsonRequestBehavior.AllowGet);
        }
    }
}
